package it.afs.worklog.application;

import org.apache.wicket.PageParameters;
import org.apache.wicket.RestartResponseException;

public abstract class LoggedPage extends BasePage
{
	public LoggedPage() {
		super();
		checkLogin();
	}

	public LoggedPage(PageParameters parameters) {
		super(parameters);
		checkLogin();
	}
	
	private void checkLogin()
	{
		if(!WorkLogSession.getCurrentSession().isLoggedUser())
			throw new RestartResponseException(LoginPage.class);
	}
}